-- autoread file when enter/focus on nvim
vim.cmd('autocmd FocusGained,BufEnter * silent! checktime')

-- change tab length based on file type
require('utils').create_augroup({
    "autocmd FileType c,cpp,java,scala,rust,php  setlocal softtabstop=8 shiftwidth=8",
    "autocmd FileType sh,zsh,ruby,python,perl    setlocal softtabstop=4 shiftwidth=4",
    "autocmd FileType conf,fstab,mail,vim,lua    setlocal softtabstop=2 shiftwidth=2",
    }, 'FileTypeTabLength')
